import request from '@/utils/request'
/* 获取部门列表 */
export function getDepartment() {
  return request({
    url: '/company/department'
  })
}
/* 获取部门详情 */
export function getDepartmentDetail(id) {
  return request({
    url: `/company/department/${id}`
  })
}
/* 更新部门 */
export function updateDepartment(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
/* 新增部门 */
export function addDepartment(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
// 获取部门负责人列表
export const getManagerList = () => request.get('/sys/user/simple')
/* 删除不明 */
export const deleteDepartment = (id) => request.delete(`/company/department/${id}`)
